import {RouteRecordRaw} from "vue-router";
import Layout from "@/layout/index.vue";
import {Body} from '@vicons/ionicons5';
import {renderIcon} from "@utils";

const routeName = 'users'


const routes: Array<RouteRecordRaw> = [
    {
        path: `/${routeName}`,
        name: routeName,
        component: () => Layout,
        redirect: `/${routeName}/list`,
        meta: {
            title: '用户管理',
            icon: renderIcon(Body),
            sort: 1
        },
        children: [
            {
                path: 'list',
                name: `${routeName}_list`,
                meta: {
                    title: '用户列表',
                    icon: renderIcon(Body)
                },
                component: () => import(/* webpackChunkName: "user" */ '@/views/user/index.vue'),
            }
        ]
    }
]

export default routes